﻿package graph 
{
	import com.hurlant.crypto.tests.ITestHarness;
	/**
	 * ...
	 * @author s
	 */
	public class Edge
	{
		internal var _userData:Object;

		private var _srcNode:Node;
		private var _dstNode:Node;
		private var _weight:Number;
		
		private var _id:int;
		private static var _idMax:int = 1;
		
		public function Edge(srcNode:Node, dstNode:Node, weight:Number) 
		{
			_srcNode = srcNode;
			_dstNode = dstNode;
			_weight = weight;
			
			_userData = null;
			
			_id = _idMax;
			_idMax++;
		}
		
		/*
		 * getter, setter
		 */
		public function get srcNode():Node
		{
			return _srcNode;
		}
		
		public function get dstNode():Node
		{
			return _dstNode;
		}
		
		public function set weight(value:Number):void 
		{
			_weight = value;
		}
		
		public function get weight():Number 
		{
			return _weight;
		}
		
		public function get id():int
		{
			return _id;
		}
	}

}